var x = true;

$("html").click(function() {
    if (x) {
        var title = document.title,
            linkname = ["首页", "博客"],
            link = ["https://storage.cjlearn.top/", "https://bloog.cjlearn.top:4215/"],
            
            code = "";
      
        var httpRequest = new XMLHttpRequest();//第一步：建立所需的对象
            httpRequest.open('GET', 'https://v1.hitokoto.cn/?c=d&c=e&c=f&encode=text', true);//第二步：打开连接  将请求参数写在url中  ps:"./Ptest.php?name=test&nameone=testone"
            httpRequest.send();//第三步：发送请求  将请求参数写在URL中
            /**
             * 获取数据后的处理程序
             */
            httpRequest.onreadystatechange = function () {
                if (httpRequest.readyState == 4 && httpRequest.status == 200) {
                    var motto = httpRequest.responseText;//获取到json字符串，还需解析
                }
            };

        code += '<h3>' + title + '</h3>';
        code += '<div><img src="https://s1.ax1x.com/2022/04/28/LXpaHx.png" alt = "Jina" /></div>';
        code += '<p>' + motto + '</p >';
        code += '<ul>';
        for (vo in linkname) {
            code += '<li> <a href= "' + link[vo] + '" > ' + linkname[vo] + ' </a></li>';
        }
        code += '</ul>';


        $(".header").append(code);
    }
})


$(document).on('click', '.buttons>span:eq(1) svg', function() {
    var $viwe = $(this).attr('viewBox');
    alert($viwe);
})

window.onload = function() {
    setTimeout(function() {
        $("html").click();
        x = false;
    }, 100);
}
